package com.xydtech.system.domain;

import com.xydtech.common.annotation.Excel;
import com.xydtech.common.core.domain.TreeEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 五级行政区划对象 sys_fivelevel_addr
 *
 * @author JHON
 * @date 2021-07-11
 */
public class FivelevelAddr extends TreeEntity {
    private static final long serialVersionUID = 1L;

    /** 行政区划码 */
    private String code;

    /** 行政区划名称 */
    @Excel(name = "行政区划名称")
    private String name;

    /** 城乡分类代码 */
    @Excel(name = "城乡分类代码")
    private String typ;

    /** 上级编码 */
    @Excel(name = "上级编码")
    private String upCode;

    /** 层级 */
    @Excel(name = "层级")
    private Long pLevel;
    /** 祖级编码 */
    private String ancestors;

    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setTyp(String typ) {
        this.typ = typ;
    }

    public String getTyp() {
        return typ;
    }

    public void setUpCode(String upCode) {
        this.upCode = upCode;
    }

    public String getUpCode() {
        return upCode;
    }

    public void setpLevel(Long pLevel) {
        this.pLevel = pLevel;
    }

    public Long getpLevel() {
        return pLevel;
    }

    @Override
    public String getAncestors() {
        return ancestors;
    }

    @Override
    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("code", getCode())
                .append("name", getName())
                .append("typ", getTyp())
                .append("upCode", getUpCode())
                .append("pLevel", getpLevel())
                .toString();
    }
}
